package math.geom3d;

import math.geomUtils.CurveType;

/**
 * @author Saga
 *
 */
public class Arc3d extends TrimmedCurve3d {

    public Arc3d(final Circle3d _circle, final double _firstParam, final double _lastParam) {
        super(_circle, _firstParam, _lastParam);
    }

    @Override
    public CurveType getCurveType() {
        return CurveType.ARC;
    }

    @Override
    public final void reverse() {
        this.baseCurve.reverse();

        final double period = this.baseCurve.getPeriod();
        this.firstParam = period - this.lastParam;
        this.lastParam = period - this.firstParam;
    }

    @Override
    public final Arc3d reversed() {
        final double period = this.getPeriod();
        return new Arc3d((Circle3d) this.baseCurve.reversed(), period - this.lastParam,
                period - this.firstParam);
    }
}
